package com.yanqu.road.entity.activity.specialtombrob.config.sign;

import com.yanqu.road.entity.activity.ActivityConditionInfo;
import com.yanqu.road.entity.activity.ActivityConfig;
import com.yanqu.road.entity.activity.ActivityInfo;
import com.yanqu.road.utils.property.Property;
import com.yanqu.road.utils.property.PropertyHelper;

import java.util.List;
import java.util.Map;

public class ActivitySignConfig {
    private ActivityInfo activityInfo;
    private String supplementarySignatureNeed = ""; //补签需要道具
    private int patronId; //投放门客id
    private String patronTransToItem = ""; //门客转换道具
    private Property property;

    public ActivitySignConfig(ActivityInfo activityInfo, Map<String, ActivityConfig> configMap) {
        this.activityInfo = activityInfo;
        if (configMap.containsKey("SUPPLEMENTARY_SIGNATURE_CONSUME")) {
            supplementarySignatureNeed = configMap.get("SUPPLEMENTARY_SIGNATURE_CONSUME").getValue();
            property = PropertyHelper.parseStringToProperty(supplementarySignatureNeed);
        }
        if (configMap.containsKey("PATRONS_ID")) {
            patronId = configMap.get("PATRONS_ID").getIntValue();
        }
        if (configMap.containsKey("PATRONS_TRANSFORM_ITEM")) {
            patronTransToItem = configMap.get("PATRONS_TRANSFORM_ITEM").getValue();
        }
    }

    public ActivityInfo getActivityInfo() {
        return activityInfo;
    }

    public int getActivityId() {
        return activityInfo.getActivityId();
    }

    public String getSupplementarySignatureNeed() {
        return supplementarySignatureNeed;
    }

    public int getPatronId() {
        return patronId;
    }

    public String getPatronTransToItem() {
        return patronTransToItem;
    }


    public Property getProperty() {
        return property;
    }
}
